package org.spring.beans.factory;

import org.spring.beans.BeansException;

public class BeanCreateException extends BeansException {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4224838833017905936L;
	private String beanName;

	public BeanCreateException(String msg) {
		super(msg);
	}

	public BeanCreateException(String msg, Throwable throwable) {
		super(msg, throwable);
	}

	public BeanCreateException(String beanName, String msg) {
		super("Error creating bean with name " + beanName + ":" + msg);
		this.beanName = beanName;
	}

	public BeanCreateException(String beanName, String msg, Throwable throwable) {
		this(beanName, msg);
		initCause(throwable);
	}

	public String getBeanName() {
		return this.beanName;
	}
}
